Skip to content

Conversation

@sloretz
Copy link
Contributor

@sloretz sloretz commented Mar 15, 2018

This PR splits the validation functions to allow passing the length of the string as a parameter. Adding these methods allows ros2/rcl#217 to avoid copying some strings while parsing remap rules.

  • rmw_validate_full_topic_name_with_size()
  • rmw_validate_namespace_with_size()
  • rmw_validate_node_name_with_size()

CI

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Add rmw_validate_full_topic_name_with_size()
Add rmw_validate_namespace_with_size()
Add rmw_validate_node_name_with_size()
@sloretz sloretz added the in review Waiting for review (Kanban column) label Mar 15, 2018
Copy link
Member

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

I would have also been ok just changing the existing functions to always require the user to call strlen, but I wasn't clear about that and this is great too.

@sloretz sloretz merged commit 82700b6 into master Mar 15, 2018
@sloretz sloretz deleted the validate_with_size branch March 15, 2018 21:05
@sloretz sloretz removed the in review Waiting for review (Kanban column) label Mar 15, 2018
dabonnie pushed a commit to aws-ros-dev/rmw that referenced this pull request Apr 2, 2019
Add rmw_validate_full_topic_name_with_size()
Add rmw_validate_namespace_with_size()
Add rmw_validate_node_name_with_size()

Signed-off-by: Devin Bonnie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants